<?php
/************************FoxPHP威客系统************************/
/*                                                            */
/*  FoxPHP.Com (C)2006-2016 FoxPHP Inc.                       */
/*  This is NOT a freeware, use is subject to license terms   */
/*  FoxPHP威客系统是商业软件,使用于商业用途请购买授权         */
/*  V3.0 2016.3                                               */
/*  foxphp@aliyun.com                                         */
/*  http://www.foxphp.com                                     */
/*                                                            */
/**************************************************************/

namespace Seller\Controller;
use Think\Controller;
class IndexController extends \Member\Controller\IndexController {

    public function indexAction(){

		$isemail=M('MemberCertificate')->token(false)->where(" type=1 AND uid=$this->uid AND status=5 ")->count();
		$ismobile=M('MemberCertificate')->token(false)->where(" type=2 AND uid=$this->uid AND status=5 ")->count();
		
		$this->assign('isemail',$isemail);
		$this->assign('ismobile',$ismobile);
		
		//待中标
		$notpayorder=M('DataOrder')->token(false)->where(" seller_uid=$this->uid AND process=0 ")->count();
		$this->assign('notpayorder',$notpayorder);
		
		//已中标
		$orderok=M('DataOrder')->token(false)->where(" seller_uid=$this->uid AND process=1 ")->count();
		$this->assign('orderok',$orderok);
		
		//待交接
		$okorderup=M('DataOrder')->token(false)->where(" seller_uid=$this->uid AND process=1 AND cid>0 AND seller_is_complete=0 AND seller_is_evaluate=0")->count();
		$this->assign('okorderup',$okorderup);
		
		//待评价
		$evaluatetask=M('DataOrder')->token(false)->where(" seller_uid=$this->uid AND process=1 AND cid>0 AND seller_is_complete=1 AND seller_is_evaluate=0 ")->count();
		$this->assign('evaluatetask',$evaluatetask);
		
		//待交接列表
		$list=M('DataOrder')->token(false)->where(" seller_uid=$this->uid AND process=1 AND cid>0 AND seller_is_complete=0 ")->order('dateline DESC')->limit(8)->select();
		$this->assign('list',$list);

		$this->display();	
    }

}